package force;
import object.mass.Mass;
import sim.Simulation;

/**
 * An abstract class that applies a global force and is associated
 * with a particular keycode.
 * @author Niel Lebeck and Wynne Lok
 *
 */
public abstract class GlobalForceSource {
    
    /**
     * Calculate the force represented by this GlobalForceSource on
     * the given mass.
     * @param m Mass
     * @param sim Simulation
     * @return
     */
    public abstract Force getForce(Mass m, Simulation sim);
    
    /**
     * Toggle this force on or off, if the given keycode applies
     * to it.
     * @param keycode the key code
     */
    public abstract void toggle(int keycode);
}
